<template>
  <div>
    <h2>Music</h2>
    <p>{{num}}</p>
  </div>
</template>


<script>
import {mapState} from "vuex"
export default {
  name:"Music",
  // mounted() {
  //   const re = mapState({
  //     num:"num"
  //   })
  //   console.log(re)
  //   console.log(re.num.call(this))
  // },
  //计算属性:使用mapState方法返回个一个键值对的num:fn()
  computed:mapState({
        num:"num"
      })
}
</script>


<style></style>